<?php
/**
 * HTTP客户端构建器模块
 * 
 * @author jlpay-sdk-php
 * @version 1.0.0
 */

namespace JLPay\Core\Http;

use Psr\Log\LoggerInterface;

/**
 * HTTP客户端构建器
 */
class DefaultHttpClientBuilder
{
    /**
     * 构建HTTP客户端
     * 
     * @param int $connectTimeout 连接超时时间，单位毫秒
     * @param int $readTimeout 读取超时时间，单位毫秒
     * @param int $maxRetries 最大重试次数，默认3次
     * @param LoggerInterface|null $logger 日志记录器
     * @return HttpClient HTTP客户端实例
     */
    public static function build($connectTimeout = 10000, $readTimeout = 30000, $maxRetries = 3, LoggerInterface $logger = null)
    {
        return new HttpClientWrapper($connectTimeout, $readTimeout, $maxRetries, $logger);
    }
} 